<template>
    <div>
        <h3>新闻列表页面</h3>

        <ul class="mui-table-view">
				<li class="mui-table-view-cell mui-media" v-for="n in 50" :key="n">
					<router-link :to="'/home/newsinfo/'+n">
						<img class="mui-media-object mui-pull-left" src="https://images.gitee.com/uploads/16/975816_chelflan.jpg?1532143828">
						<div class="mui-media-body">
							<h1>幸福</h1> 
							<p class='mui-ellipsis'>
                                <span>发表时间:2013-12-16 12:22:22</span>
                                <span>点击：0次</span>
                            </p>
						</div>
					</router-link>
				</li>
               
			</ul>
    </div>
</template>
<script>
import { Toast } from "mint-ui"
    export default{
        data(){
            return {
                newslist:[]
            }
        },
        created(){
        //    this.getNewsList();
        },
        methods:{
            getNewsList(){
                this.$http.get('api/getnewslist').then(res=>{
                    if(res.body.status === 0){
                        this.newslist = res.body.message;
                    }else{
                        Toast('获取新闻列表失败')
                    }
                })
            }

        }
    }
</script>
<style lang="scss" scoped>
.mui-table-view{
  li{
      h1{
          font-size: 14px;
      }
      .mui-ellipsis{
          font-size: 12px;
          color: #22fa;
          display: flex;
          justify-content: space-between;
      }
  }
}
    
</style>